package arrayListTest;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 黎鹤舞
 * Date: 2023-12-02
 * Time: 20:57
 */
public class Test {

    public static ArrayList<Character> func(String str1,String str2) {

        ArrayList<Character> arrayList = new ArrayList<>();

        for (int i = 0; i < str1.length(); i++) {
            boolean flg = false;
            for (int j = 0; j < str2.length(); j++) {
                if(str1.charAt(i) == str2.charAt(j)) {
                    flg = true;
                    break;
                }
            }
            if(!flg) {
                arrayList.add(str1.charAt(i));
            }
        }
        return arrayList;
    }
    public static void main(String[] args) {
        ArrayList<Character> arrayList = new ArrayList<>();
        arrayList = func("welcome to cvte","come");
        System.out.print(arrayList);
    }
}
